<template>
	<view class="all">
		<view class="select">
			<u-subsection :list="list" :current="curNow" @change="sectionChange" class='subsection'></u-subsection>
			<view class="com">
				<view v-if="curNow===0" class="0">
					<gridOrder></gridOrder>
				</view>
				<view v-if="curNow===1" class="1">
					<grid-orderd></grid-orderd>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import gridOrder from "pages/grid-order/grid-order"
	import gridOrderd from"pages/grid-order-done/grid-order-done"
	export default {
		data() {
			return {
				list: [
									{
										name: '正在进行订单'
									}, 
									{
										name: '已完成订单'
									}
					
								],
								curNow: 1
			}
		},
		methods: {
			
			sectionChange(index) {
							this.curNow = index;
						}
		},
		components:{
			gridOrder,
			gridOrderd,
			
		}
	}
</script>

<style lang="scss">
.all{
	.select{
		top:10rpx;
		.com{
			top:10rpx
		}
	}
}
	

</style>
